package com.enjoyor.soa.traffic.core.efoms.mapper.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.enjoyor.soa.traffic.core.efoms.constant.DeviceUnnormalCollectInfoSqlId;
import com.enjoyor.soa.traffic.core.efoms.domain.DeviceUnnormalCollectInfo;
import com.enjoyor.soa.traffic.core.efoms.mapper.IDeviceUnnormalCollectInfoMapper;
import com.enjoyor.soa.traffic.frame.support.mybatis.mapper.impl.BaseMapper;

@Component
public class DeviceUnnormalCollectInfoMapper extends BaseMapper<DeviceUnnormalCollectInfo> implements IDeviceUnnormalCollectInfoMapper{

	@Override
	public List<DeviceUnnormalCollectInfo> getDeviceUnnormalCollectInfoList(Map<String,Object> map) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.selectList(getSqlName(DeviceUnnormalCollectInfoSqlId.SQL_SELECT_LIST),map);
	}

	@Override
	public List<DeviceUnnormalCollectInfo> getDeviceUnNorForArea(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.selectList(getSqlName(DeviceUnnormalCollectInfoSqlId.SQL_SELECT_LIST_FOR_AREA),map);
	}

	@Override
	public List<DeviceUnnormalCollectInfo> getFaultCollectReal(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.selectList(getSqlName(DeviceUnnormalCollectInfoSqlId.SQL_SELECT_FAULT_REAL),map);
	}

	@Override
	public List<DeviceUnnormalCollectInfo> getFaultCollectRealTrend(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.selectList(getSqlName(DeviceUnnormalCollectInfoSqlId.SQL_SELECT_FAULT_REAL_TREND),map);
	}

	@Override
	public List<DeviceUnnormalCollectInfo> getDeviceSumForArea(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.selectList(getSqlName(DeviceUnnormalCollectInfoSqlId.SQL_SELECT_SUMDEV_FOR_AREA),map);
	}

	@Override
	public int getWarnHisCount(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.selectOne(getSqlName(DeviceUnnormalCollectInfoSqlId.SQL_SELECT_WARN_HIS_COUNT),map);
	}

	@Override
	public int getWarnRealCount(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.selectOne(getSqlName(DeviceUnnormalCollectInfoSqlId.SQL_SELECT_WARN_REAL_COUNT),map);
	}

}
